<!DOCTYPE html>
<html lang="ru">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>9 практическая</title>
	<link rel="stylesheet" href="../css/style.css">
	<link rel="shortcut icon" href="https://media04.lokalkompass.de/article/2017/07/25/3/9561933_XXL.jpg">
</head>
<body>
	<div class="header-wraper">
		<div class="header">
			<a href="/" class="logo-link">
				<img src="../css/s2.png" alt="logo" class="logo-img">
				<p class="logo-text">На главную</p>
			</a>
		</div>
	</div>
	<div class="content-wraper">
		<div class="content">
			<form action="#" method="GET">
				<h1 class="title">Введите цвет:</h1>
				<input type="text" name="color" class="input-text">
				<button type="submit" class="butsub" >Перевести</button>
			</form>
			<div class="translate">
				<span>Перевод: </span>
				<span><?php

					if ($_GET['color']){
						$color = strtolower($_GET['color']);
						switch ($color) {
							case 'red':
								$translare = "красный";
								break;
							
							case 'blue':
								$translare = "синий";
								break;

							case 'black':
								$translare = "чёрный";
								break;

							case 'white':
								$translare = "белый";
								break;

							case 'green':
								$translare = "зелёный";
								break;

							case 'orange':
								$translare = "оранжевый";
								break;

							default:
								$translare = "неизвестный";
								break;
						}
						echo $translare;
					}
				?></span>
				<div class="color-wiew" style="background:<? echo $color; ?>">
					
				</div>
			</div>
		</div>
	</div>
</body>
</html>
